#include<stdio.h>
#include<stdlib.h>
int main(void)
{
    int k = 5;
    int Array[] = {1,3,2,6,-1,4,1,8,2};
    float Sum, Average;
    int Lengh = sizeof(Array)/4;
    int i,j,times=Lengh-k+1;
    float * Out_Array = (float *)malloc(sizeof(float)*(times));
    for (i = 0; i < times; i++)
    {
        Sum = 0;
        for(j = i; j < k+i; j++)
        {
            Sum = Sum + Array[j];
        }
        Average = Sum / k;
        Out_Array[i] = Average;
        printf("Out_Array[%d]:%.1f\n", i, Out_Array[i]);
    }
}